/*    */ package eos.moe.dragoncore;
/*    */ 
/*    */ import java.io.EOFException;
/*    */ import java.io.IOException;
/*    */ import java.io.InputStream;
/*    */ import java.io.PushbackInputStream;
/*    */ import java.util.zip.DataFormatException;
/*    */ import java.util.zip.Inflater;
/*    */ 
/*    */ 
/*    */ public class xm
/*    */   extends sd
/*    */ {
/*    */   private Inflater i;
/*    */   private byte[] w;
/* 16 */   private byte[] q = new byte[1];
/*    */   private int g;
/*    */   
/*    */   public xm(fl fl1) {
/* 20 */     super(fl1);
/* 21 */     this.i = new Inflater(true);
/* 22 */     this.w = new byte[4096];
/*    */   }
/*    */ 
/*    */   
/*    */   public int read() throws IOException {
/* 27 */     int i = read(this.q);
/*    */     
/* 29 */     if (i == -1) {
/* 30 */       return -1;
/*    */     }
/*    */     
/* 33 */     return this.q[0];
/*    */   }
/*    */ 
/*    */   
/*    */   public int read(byte[] arrayOfByte) throws IOException {
/* 38 */     return read(arrayOfByte, 0, arrayOfByte.length);
/*    */   }
/*    */ 
/*    */   
/*    */   public int read(byte[] arrayOfByte, int i, int j) throws IOException {
/*    */     try {
/*    */       int k;
/* 45 */       while ((k = this.i.inflate(arrayOfByte, i, j)) == 0) {
/* 46 */         if (this.i.finished() || this.i.needsDictionary()) {
/* 47 */           return -1;
/*    */         }
/* 49 */         if (this.i.needsInput()) {
/* 50 */           v();
/*    */         }
/*    */       } 
/* 53 */       return k;
/* 54 */     } catch (DataFormatException dataFormatException) {
/* 55 */       throw new IOException(dataFormatException);
/*    */     } 
/*    */   }
/*    */ 
/*    */   
/*    */   public void v(InputStream inputStream) throws IOException {
/* 61 */     if (this.i != null) {
/* 62 */       this.i.end();
/* 63 */       this.i = null;
/*    */     } 
/* 65 */     super.v(inputStream);
/*    */   }
/*    */ 
/*    */   
/*    */   public void v(PushbackInputStream pushbackInputStream) throws IOException {
/* 70 */     int i = this.i.getRemaining();
/* 71 */     if (i > 0) {
/* 72 */       byte[] arrayOfByte = v();
/* 73 */       pushbackInputStream.unread(arrayOfByte, this.g - i, i);
/*    */     } 
/*    */   }
/*    */ 
/*    */   
/*    */   public void close() throws IOException {
/* 79 */     if (this.i != null) {
/* 80 */       this.i.end();
/*    */     }
/* 82 */     super.close();
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\xm.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */